<template>
  <div class="sommer-index">
    <!-- 搜商机 -->
    <span class="ssjSpan">搜商机</span>
    <!-- Search for cooperative opportunities -->
    <span class="Search">Search for cooperative opportunities</span>
    <!-- Input -->
    <div class="Input-box">
      <div class="Input">
        <span>型号</span>
        <el-input
          placeholder="请输入您的库存型号,搜索合作商机"
          v-model="inputVal"
          clearable
          class="elInput"
        >
        </el-input>
        <span @click="toSommerList()">
          <i class="el-icon-search"></i>
        </span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      inputVal: "",
    };
  },
  methods: {
    // 跳转
    toSommerList() {
        this.$router.push({
          path: "/sommer/list",
          query: {
            value: this.inputVal
          }
        })
    }
  }
};
</script>

<style lang="scss" scoped>
.sommer-index {
  min-height: calc(100vh - 148px);
  background: url("../../../assets/images/sommer_index_bg.png") no-repeat center
    center;
  background-size: 100% 100%;
  margin: 15px;
  position: relative;
  .ssjSpan {
    font-size: 57px;
    font-weight: 500;
    color: #001671;
    line-height: 79px;
    position: absolute;
    top: 116px;
    left: 115px;
  }
  .Search {
    font-size: 28px;
    font-weight: 400;
    color: #7282c3;
    position: absolute;
    top: 202px;
    left: 115px;
  }
  .Input-box {
    position: absolute;
    top: 293px;
    left: 115px;
  }
  .Input {
    display: flex;
    align-items: center;
    height: 70px;
    & > span:nth-child(1) {
      width: 92px;
      text-align: center;
      line-height: 70px;
      font-size: 22px;
      font-weight: 500;
      color: #2348e8;
      background: #d9eaff;
      border-radius: 6px 0px 0px 6px;
      display: inline-block;
    }
    & > ::v-deep .el-input {
      width: 396px;
      height: 100%;
      font-size: 20px;
      .el-input__inner {
        height: 100%;
        line-height: 70px;
      }
      .el-input__suffix {
        right: 14px !important;
        .el-input__clear {
          font-size: 24px;
          line-height: 70px;
        }
      }
    }
    & > span:last-child {
      background: #2348e8;
      border-radius: 0px 6px 6px 0px;
      color: #fff;
      font-size: 34px;
      cursor: pointer;
      padding: 15px 18px 16px 18px;
      box-sizing: border-box;
      display: inline-block;
    }
  }
}
</style>